<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" xmlns:margin-right="http://www.w3.org/1999/xhtml"
      layout:decorator="layout/layout">
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
</head>
<body>
<div class="page-login-wrap">
    <div class="page-login-cnt" align="center">
        <span style="font-size: 25px">用户登录</span>
        <form action="/user/login" method="post">
            <div class="login-wrap">
                <div class="login-logo">
                    <div class="login-logo-img"></div>
                </div>
                <div class="login-form">
                    <div class="form-item">
                        <i class="vd-icon icon-user"></i>
                        用户名<input type="text" id="username" name="username" placeholder="用户名" th:value="${username}" class="login-input" required="required">
                    </div>
                    <div class="form-item">
                        <i class="vd-icon icon-password"></i>
                        密码<input type="password" name="password" id="password" placeholder="密码" class="login-input" th:value="${password}" required="required">
                    </div>

                    <!--<div class="form-error" name="errorMessage" id="errorMessage"></div>-->
                    <div class="errorMessage" th:value="${errorMessage}" style="color: red;overflow: auto;padding: 10px 15px;max-height:100%;overflow: auto" ></div>
                    <div class="form-btn">
                        <button type="submit" class="btn btn-blue">登录</button>
                        <!--<button type="submit" class="btn btn-blue" onclick="userLogin()">登录</button>-->
                        <a class="btn btn-blue" href="/user/toSign">注册</a>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<th:block layout:fragment = "pagejs">
    <script th:src="@{${#httpServletRequest.getContextPath()} + '/common/js/jquery.js'(v=${resourceVersion})}"></script>
    <script th:src="@{${#httpServletRequest.getContextPath()} + '/js/login.js'}"></script>
</th:block>

</body>
</html>